package com.example.demo.es;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;
import org.springframework.data.elasticsearch.annotations.Mapping;

@Data
@Document(indexName = "search-log")
@Mapping
public class SearchLogEntity {
    @Id
    private String id;

    @Field(type = FieldType.Text, analyzer = "ik_max_word", searchAnalyzer = "ik_word")
    private String searchText;

    @Field(type = FieldType.Text, analyzer = "ik_max_word", searchAnalyzer = "ik_word")
    private String suggestText;

}
